<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<script>
function setFocus(){
	document.forms['form1'].elements['dossard'].focus();
}
</script>
</head>

<body onLoad="setFocus()">
<?php 
require_once 'tools/db/DbUtils.php';
require_once 'tools/http/HTTP_REQUEST.php';
require_once 'tools/db/queries.php';
require_once 'tools/service/tools.php';
$obj_utils=new DbUtils();
$obj_utils->connect();
$saved=false;
if(isset($_POST['dossard'])){

	
	$saved=$obj_utils->setRunner($_POST['dossard']);
	
	
}
$obj_utils->connect();
$courseToShow=$obj_utils->getCourse();
$query=getQueryForKey("generalLast10",$courseToShow);
$tabRequest=$obj_utils->executeQuery($query);
$tool=new Tool($obj_utils);


?>
<h1>Arrivée</h1>

<form name="form1" method="post" action="./index.php?page=timer.php">
<table class="principale">
	<tr>
		<td width="50%" align="center">
			<table >
				<tr><td style="text-align: center;"><strong>Numéro de dossard:&nbsp;</strong></td></tr>
				<tr>
					<td style="text-align: center;"> 
						<input maxlength="5" size="5" type="text" name="dossard" autocomplete="off" style="font-size: 25px; text-align: right;">
						<input type="submit" name="Submit" value="Submit">
					</td>
					
				</tr>	
			</table>	
		</td>
		<?php if($tabRequest!=0){?>
		<td width="100%" align="right">
		
			<table>
				<tr>
					<td class="style1">
					<?php $tool->listQuery($tabRequest,"10 Derniéres arrivées",$courseToShow);?>
					</td>
				</tr>	
			</table>	
		</td>
		<?php }?>
	</tr>
</table>
</form>
<?php $obj_utils->close();?>
</body>

</html>
